﻿using DevExpress.Utils.Win;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Popup;
using DevExpress.XtraGrid.Demos.util;
using DevExpress.XtraGrid.Editors;
using DevExpress.XtraLayout;
using DiaoPaiDaYin;
using DXApplicationTangche.DTO;
using DXApplicationTangche.DTO.坚山;
using DXApplicationTangche.service;
using DXApplicationTangche.service.redis_service;
using DXApplicationTangche.UC.下单MTO.Service;
using DXApplicationTangche.UC.尺寸;
using DXApplicationTangche.UC.款式异常;
using DXApplicationTangche.UC.款式管理;
using DXApplicationTangche.UC.订单一览新.订单预览新.model;
using DXApplicationTangche.UC.订单一览新.订单预览新.service;
using DXApplicationTangche.UC.订单一览新.辅料.service;
using DXApplicationTangche.UC.订单一览新.辅料.辅料下单;
using DXApplicationTangche.UC.设计点;
using DXApplicationTangche.UC.货号管理;
using DXApplicationTangche.UC.货号管理.service;
using DXApplicationTangche.UC.辅料;
using DXApplicationTangche.UC.销售管理;
using DXApplicationTangche.UC.门店下单.DTO;
using DXApplicationTangche.UC.门店下单.form;
using DXApplicationTangche.UC.门店下单.service;
using mendian;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using static mendian.Frm设计点;

namespace DXApplicationTangche.UC.门店下单.下单
{
    public partial class Form下单选款 : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        public Form下单选款()
        {
            InitializeComponent();
            
        }
    }
    /// <summary>
    /// 将刺绣DTO转成设计点DTO的中间VO，仅用于此页面
    /// </summary>
    public class VO刺绣
    {
        public String itemTypeNameCn { get; set; }
        public String itemCd { get; set; }
        public String itemValue { get; set; }
        public String optionValue { get; set; }
        public String name { get; set; }
        public VO刺绣()
        {
            this.itemCd = "";
        }
        public VO刺绣(Boolean 刺绣内容)
        {
            this.itemCd = "SHIRT_MONOGRAM_SCO";
            this.itemTypeNameCn = "刺绣内容";
            this.itemValue = "4SMT";
        }
        public VO刺绣(String item, DTO刺绣 dTO)
        {
            if ("4SMC".Equals(item))
            {
                this.itemCd = "SHIRT_MONOGRAM_SMC";
                this.itemTypeNameCn = "刺绣颜色";
            }
            else if ("4SMO".Equals(item))
            {
                this.itemCd = "SHIRT_MONOGRAM_SMO";
                this.itemTypeNameCn = "刺绣字体";
            }
            else if ("4SMP".Equals(item))
            {
                this.itemCd = "SHIRT_MONOGRAM_SMP";
                this.itemTypeNameCn = "刺绣位置";
            }
            else if ("4SMS".Equals(item))
            {
                this.itemCd = "SHIRT_MONOGRAM_SMS";
                this.itemTypeNameCn = "刺绣尺寸";
            }
            this.itemValue = item;
            this.optionValue = dTO.itemValue;
            this.name = dTO.itemNameCn;
        }
    }
    /// <summary>
    /// 将刺绣的dto转成能与设计点DTO转化的DTO的model
    /// </summary>
    public class Model刺绣
    {
        public List<VO刺绣> vO刺绣s { get; set; } = new List<VO刺绣>();
        /// <summary>
        /// 将刺绣的dto转成能与设计点DTO转化的DTO
        /// </summary>
        /// <param name="item"></param>
        /// <param name="dTO刺绣s"></param>
        public Model刺绣(String item,List<DTO刺绣> dTO刺绣s)
        {
            foreach (DTO刺绣 dTO刺绣 in dTO刺绣s)
            {
                this.vO刺绣s.Add(new VO刺绣(item, dTO刺绣));
            }
        }
    }
}
